﻿@page "/scheduler/month-agenda-view"

@using Syncfusion.Blazor.Schedule
@inherits SampleBaseComponent;

<SampleDescription>
    <p>This demo showcases the layout of Month Agenda view and its working.</p>
</SampleDescription>
<ActionDescription>
    <p>
        In this demo, the active view of Scheduler is set to<code>MonthAgenda</code> and no other view options are provided to <code>Views</code> property. This view is designed by considering the combination of both the calendar and agenda layout together,
        so that whenever a particular date is selected - the events belonging to that date will be displayed on the event section at the bottom. Also, the dates which holds one or more events are marked with a round indicator below that date.
    </p>
    <p> On double clicking the date cells, the user can open the default event editor to create events. The events displayed on this view at the bottom section can be edited or deleted either through popup options or edit event editor. </p>
</ActionDescription>

<div class="col-lg-12 control-section">
    <div class="schedule-wrapper">
        <SfSchedule TValue="ScheduleData.FifaEventsData" Width="100%" Height="510px" @bind-SelectedDate="@CurrentDate">
            <ScheduleViews>
                <ScheduleView Option="View.MonthAgenda"></ScheduleView>
            </ScheduleViews>
            <ScheduleEventSettings DataSource="@DataSource"></ScheduleEventSettings>
        </SfSchedule>
    </div>
</div>
@*custom code start*@
<style>

    @@media (min-width: 481px) {
        .schedule-wrapper {
            margin: 0 25%;
        }
    }
</style>
@*custom code end*@


@code{
    private DateTime CurrentDate = new DateTime(2020, 1, 22);
    public List<ScheduleData.FifaEventsData> DataSource = new ScheduleData().GetFifaEventsData();
}
